package edu.wpi.cs509.representation;

import java.io.Serializable;

//import java.sql.Time;

/**
 * GameID class contains the unique game ID value for each new game started as well
 * as access methods to retrieve the GameID in long format.
 * @author Scott Sussman
 *
 */
public class GameID extends StrategoObjectBc implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static long gameID;
	
	public GameID(String name) {
		super(name);
		
		gameID = System.currentTimeMillis();
	}
	
	public GameID(String name,long gid) {
		super(name);
		
		gameID = gid;
	}
	/**
	 * toString() - Return the game ID in string format
	 * @return gameIDString;
	 */
	public String toString() {
		StringBuilder gameIDString = new StringBuilder();
		//String NEW_LINE = System.getProperty("line.seperator");
		
		gameIDString.append(gameID);
		
		return gameIDString.toString();
	}
	
	/**
	 * getGameIDLong() - Gets the game ID in long format
	 * @return gameID
	 */
	public long getGameIDLong() {
		return gameID;
	}
}
